﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Skybot.Tong;

public partial class FTP_FTPUpload : System.Web.UI.Page
{
    /// <summary>
    /// 用于初始化
    /// </summary>
    Skybot.Tong.Tyg.Creates.FtpWeb ftp = null;

    protected void Page_Load(object sender, EventArgs e)
    {
        //ftp = new Skybot.Tong.Tyg.Creates.FtpWeb("daonidedie.104web.20hx.com", "web", "daonidedie", "BABCF382FF2bc3");
        FtpHelper ftp2 = new FtpHelper(new Uri("ftp://daonidedie.104web.20hx.com"), "daonidedie", "BABCF382FF2bc3");
        ////比较当前目录下有没有对应的文件名
        //ftp.FileExist("邓红蕾.txt");
        //if (ftp.Upload(@"C:\Users\Sky\Desktop\邓红蕾.txt"))
        //{
        //    Response.Write("上传文件成功" + ftp.FtpPath + "邓红蕾.txt");

        //}
        //try
        //{
        //    //切换目录
        //    ftp.GotoDirectory("/web/docs", true);
        //    ftp.MakeDir("1");
        //}
        //catch
        //{
        //    ftp.MakeDir("/web/docs/1/");
        //}


        ftp2.CreateDirectory("/web/docs/1");

    }
}